package com.xunker.statisticts.controller;

import com.xunker.appointment.result.Result;
import com.xunker.appointment.vo.order.OrderCountQueryVo;

import com.xunker.statisticts.service.StatisticService;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("admin/statistics")
public class StatisticsController {
    @Autowired
    private StatisticService statisticService;
    @ApiOperation(value = "获取订单统计数据")
    @PostMapping("getCountMap")
    public Result getCountMap(@ApiParam(name = "orderCountQueryVo", value = "查询对象", required = false) OrderCountQueryVo orderCountQueryVo) {
        Map<String, Object> objectMap= statisticService.getCountMap(orderCountQueryVo);
        return Result.ok(objectMap);
    }
}
